from django.shortcuts import render
from rest_framework import viewsets
from rest_framework .response import Response
from .serializers import StudentSerializer
from .models import Student

# Create your views here.


class StudentViewSet(viewsets.ViewSet):
    def list(self,request):
        students = Student.objects.all()
        serializer = StudentSerializer(students,many=True)
        return Response(serializer.data)
